<?php

namespace app\api\validate\fp;

use app\common\enum\fp\PostLikeTypeEnum;
use think\Validate;

class PostCommentsValidate extends Validate
{
    protected $failException = true;

    protected $rule = [
        'post_id' => 'require',
        'creator_id' => 'require',
        'content' => 'require|max:255',
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'comment' => ['post_id', 'creator_id', 'comment_id','content'],
        'list' => ['post_id'],
    ];

    public function __construct()
    {
        $this->field = [
            'post_id' => __('post_id'),
            'comment_id' => __('comment_id'),
            'reply_user_id' => __('reply_user_id'),
            'content' => __('content'),
        ];
        parent::__construct();
    }

}
